﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NTrace.VSPackage
{
    internal static class HResult
    {
        public const int S_OK = 0;
        public const int S_FALSE = 1;
        public static String ToString(int hr)
        {
            String output;
            switch (hr) 
            {
                case S_OK:
                    output = "S_OK";
                    break;
                case S_FALSE:
                    output = "S_FALSE";
                    break;
                default:
                    EtwTrace.Trace(EtwTraceLevel.Error, EtwTraceFlag.Diagnostic, "Unknown HRESULT {0}", hr);
                    output = "???";
                    break;
            }
            return output;
        }
    }
}
